import request from '@/utils/request.js'
//注册
export const register = (userInfo) => {
  return request({
    url: '/register',
    method: 'post',
    data: userInfo
  })
}

//登录
export const login = (userInfo) => {
  return request({
    url: '/login',
    method: 'post',
    data: userInfo
  })
}

//获取用户信息
export const getUserInfo = () => {
  return request({
    url: '/user',
    method: 'get'
  })
}

//根据用户账号获取该账号使用中的桌子
export const useTable = () => {
  return request({
    url: '/table/use',
    method: 'get'
  })
}

//用户忘记密码
export const userForgot = (data) => {
  return request({
    url: '/forgot',
    method: 'post',
    data
  })
}
